import http from '@/utils/http'
import axios from 'axios';
import { baseURL } from '@/utils/request';

//上传文件并返回url
export function upload(data) {
    return http.post('/lzh/file/upload', data)
}

//上传文件并返回文件信息
export function upload2(formData) {
    return axios.post(
        baseURL + 'lzh/file/upload2',
        formData,
        {
            headers: {
                'Content-Type': 'multipart/form-data',
                'token': localStorage.getItem('token'),
            },
        }
    );
}